package com.kitkat.filter;

import java.util.Iterator;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.kitkat.entities.User;

public class Test {
	public static void main(String[] args) {
		User user = new User("253362792@qq.com","123456","123456");
		String jsonString = JSONObject.toJSONString(user);
		System.out.println(jsonString);
		
		Map<String,Object> map = JSONObject.parseObject(jsonString, Map.class);
		Iterator<String> it = map.keySet().iterator();
		while(it.hasNext()){
			String key = it.next();
			Object value = map.get(key);
			System.out.println(key+":"+value);
		}
	}
}
